package cn.homework.service.impl;

import cn.homework.dao.OrdersDao;
import cn.homework.dao.impl.OrderDaoImpl;
import cn.homework.domain.Orders;
import cn.homework.service.OrdersService;

import java.util.List;
import java.util.Map;

/**
 * @author ACT
 */
public class OrdersServiceImpl implements OrdersService {
    private OrdersDao dao = new OrderDaoImpl();

    @Override
    public void addOrderToDatabase(Orders orders, String name) {
        dao.addOrderToDatabase(orders, name);
    }

    @Override
    public List<Orders> findAllOrders(String name) {
        return dao.findAllOrders(name);
    }

    @Override
    public List<Orders> findAllOrdersReveal() {
        return dao.findAllOrdersReveal();
    }

    @Override
    public void delOrderById(String id) {
        dao.delOrderById(id);
    }

    @Override
    public List<Orders> findOrderByCondition(Map<String, String[]> map) {
        return dao.findOrderByCondition(map);
    }
}
